import pymysql

conn = pymysql.connect(host='192.168.196.128', db='wa_test', user='root', passwd='123456')

cursor = conn.cursor()
sqls = ["delete from info where id=6", "delete from users where username='test06'",
        "insert into users(id,username,password)values(6,'test06',md5('123456'))",
        "insert into info(id,name)values(6,'测试06')"]
# sql="delete from info where id=6"
# cursor.execute(sql)
#
# sql="delete from users where username='test06'"
# cursor.execute(sql)
#
# sql="insert into users(id,username,password)values(6,'test06',md5('123456'))"
# cursor.execute(sql)
#
# sql="insert into info(id,name)values(6,'测试06')"
for sql in sqls:
    cursor.execute(sql)

conn.commit()
conn.close()
